package  
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class IceCorners extends Sprite 
	{
		private var FLeftTop:MovieClip;
		private var FRightTop:MovieClip;
		private var FLeftBottom:MovieClip;
		private var FRightBottom:MovieClip;
		
		public function IceCorners():void 
		{
			FLeftTop = getChildByName('LTCorner') as MovieClip;
			FRightTop = getChildByName('RTCorner') as MovieClip;
			FLeftBottom = getChildByName('LBCorner') as MovieClip;
			FRightBottom = getChildByName('RBCorner') as MovieClip;
			addEventListener(Event.ADDED_TO_STAGE, OnAddedToStage);
		}		
		
		private function OnAddedToStage(e:Event):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, OnAddedToStage);
			stage.addEventListener(Event.RESIZE, OnStageResize);
		}
		
		private function OnStageResize(e:Event):void 
		{
			FLeftTop.x = 0;
			FLeftTop.y = 0;
			
			FRightTop.x = stage.stageWidth;
			FRightTop.y = 0;
			
			FLeftBottom.x = 0;
			FLeftBottom.y = stage.stageHeight;
			
			FRightBottom.x = stage.stageWidth;
			FRightBottom.y = stage.stageHeight;
		}
	}
}